/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package base;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 *
 * @author Tue
 */
/**
 *
 * @author Tue
 */
public class Configuration {
    private static Properties properties;
    private final static String CONFIG_FILE_PATH="conf/wave.properties";

    static {
        try {
            properties = new Properties();
            FileInputStream fis = new FileInputStream(CONFIG_FILE_PATH);
            properties.load(fis);
            fis.close();
        } catch (IOException ioEx){
            ioEx.printStackTrace();
        }
    }
    public Configuration(String propertieFilePath, int temp) throws IOException {
        properties = new Properties();
        FileInputStream fis = new FileInputStream(propertieFilePath);
        properties.load(fis);
        fis.close();
    }
    public static String getValue(String key){
        return properties.getProperty(key);
    }
    public static String getValue(String key, String defaultValue){
        return properties.getProperty(key, defaultValue);
    }
}
